<template>
  <div id="app">
    <el-tabs
      v-model="activeName"
      :tab-position="tabPosition"
      @tab-click="handleClick"
    >
      <el-tab-pane
        v-for="(item, index) in tabItems"
        :label="item.label"
        :name="item.name"
        :key="index"
      >
        <h3>{{ item.label }}组件</h3>
        <div class="wrapper"></div>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>

export default {
  name: 'App',
  data () {
    return {
      tabItems: [
        {
          label: '表格',
          name: '0'
        },
        {
          label: '表单',
          name: '1'
        },
        {
          label: '表格',
          name: '2'
        },
        {
          label: '表格',
          name: '3'
        },
        {
          label: '表格',
          name: '4'
        },
        {
          label: '表格',
          name: '5'
        },
        {
          label: '表格',
          name: '6'
        },
        {
          label: '表格',
          name: '7'
        },
        {
          label: '表格',
          name: '8'
        },
        {
          label: '表格',
          name: '9'
        },
      ],
      tabPosition: 'left',
      activeName: 'second'
    };
  },
  methods: {
    handleClick (tab, event) {
      console.log(tab, event);
    }
  },
  components: {
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
</style>
